//
//  MessageTableViewCell.m
//  JiuLe
//
//  Created by xcq on 15/11/29.
//  Copyright © 2015年 Fine. All rights reserved.
//

#import "MessageTableViewCell.h"
@implementation MessageTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setModel:(MessageModel *)model {
    if (model==nil) {
        return;
    }
    _model = model;
    if ([_model.read integerValue] == 0) {
        _readStatus.hidden = NO;
    } else {
        _readStatus.hidden = YES;
    }
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
    _messageTime.text =  [dateFormatter stringFromDate:[NSDate dateWithTimeIntervalSince1970:[_model.time integerValue]]];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
//   ?  }
}
@end
